package entity;

public class Address {

  private String masterNumber;

  private String country;

  private String city;

  private String street;

  public Address(String masterNumber, String country, String city, String street) {
    this.masterNumber = masterNumber;
    this.country = country;
    this.city = city;
    this.street = street;
  }

  public void setMasterNumber(String masterNumber) {
    this.masterNumber = masterNumber;
  }
  public String getMasterNumber(){
    return masterNumber;
  }
  public String getCountry() { return country;}
  public String getCity() { return city;}
  public String getStreet() { return street; }

  public String returnAddress(){
    return country+" "+city+" "+street+"";
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Address other = (Address) obj;
    if (masterNumber == null) {
      if (other.masterNumber != null)
        return false;
    } else if (!masterNumber.equals(other.masterNumber))
      return false;
    if (country == null) {
      if (other.country != null)
        return false;
    } else if (!country.equals(other.country))
      return false;
    if (city == null) {
      if (other.city != null)
        return false;
    } else if (!city.equals(other.city))
      return false;
    if (street == null) {
      if (other.street != null)
        return false;
    } else if (!street.equals(other.street))
      return false;
    return true;
  }
}


